import 'package:get/get.dart';
import 'package:library_base/route/i_router.dart';
import 'package:library_base/route/middleware/login_middleware.dart';
import 'package:library_base/route/routers.dart';
import 'package:module_wms/page/deliver_goods/deliver_goods_controller.dart';
import 'package:module_wms/page/deliver_goods/deliver_goods_page.dart';
import 'package:module_wms/page/incoming_orders/incoming_orders_controller.dart';
import 'package:module_wms/page/incoming_orders/incoming_orders_detail/incoming_orders_detail_controller.dart';
import 'package:module_wms/page/incoming_orders/incoming_orders_detail/incoming_orders_detail_page.dart';
import 'package:module_wms/page/incoming_orders/incoming_orders_detail/single_head_entry_page/location/location_controller.dart';
import 'package:module_wms/page/incoming_orders/incoming_orders_detail/single_head_entry_page/location/location_page.dart';
import 'package:module_wms/page/incoming_orders/incoming_orders_detail/single_head_entry_page/wms_single_head_entry_page.dart';
import 'package:module_wms/page/incoming_orders/incoming_orders_detail/single_head_entry_page/wms_single_head_entry_page_controller.dart';
import 'package:module_wms/page/incoming_orders/incoming_orders_page.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/inventory_distribution/inventory_distribution_no_single/inventory_distribution_no_single_controller.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/inventory_distribution/inventory_distribution_no_single/inventory_distribution_no_single_page.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/inventory_distribution/inventory_distribution_single/inventory_distribution_single_controller.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/inventory_distribution/inventory_distribution_single/inventory_distribution_single_page.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/order_detail_controller.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/order_detail_page.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/print_detail/device_detail/device_detail_controller.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/print_detail/device_detail/device_detail_page.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/print_detail/print_detail_controller.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/print_detail/print_detail_page.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/print_detail/search_device/search_device_controller.dart';
import 'package:module_wms/page/outbound_orders/as_order/order_detail/print_detail/search_device/search_device_page.dart';
import 'package:module_wms/page/outbound_orders/outbound_orders_manage_controller.dart';
import 'package:module_wms/page/outbound_orders/outbound_orders_manage_page.dart';
import 'package:module_wms/page/wms_workbanch_page.dart';
import 'package:module_wms/page/wms_workbench_controller.dart';

class WmsRouter implements IRouter {
  @override
  List<GetPage> getPageBuilders() {
    return [
      GetPage(
        name: Routers.wms, page: ()=>const WmsWorkbenchPage(),
        binding: BindingsBuilder((){
          Get.lazyPut(() => WmsWorkbenchController());
        }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.OUTBOUND_ORDERS_MANAGE, page: ()=>const OutboundOrdersManagePage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => OutboundOrdersManageController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.ORDER_DETAIL_PAGE, page: ()=>const OrderDetailPage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => OrderDetailController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.INVENTORY_DISTRIBUTION_SINGLE_PAGE, page: ()=>const InventoryDistributionSinglePage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => InventoryDistributionSingleController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.WMS_SINGLE_HEAD_ENTRY_PAGE, page: ()=>const WmsSingleHeadEntryPage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => WmsSingleHeadEntryController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.INCOMING_ORDERS, page: ()=>const IncomingOrdersPage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => IncomingOrdersController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.INCOMING_ORDERS_DETAIL_PAGE, page: ()=>const IncomingOrdersDetailPage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => IncomingOrdersDetailController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.LOCATION_PAGE, page: ()=>const LocationPage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => LocationController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.INVENTORY_DISTRIBUTION_NO_SINGLE_PAGE, page: ()=>const InventoryDistributionNoSinglePage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => InventoryDistributionNoSingleController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.PRINT_DETAIL_PAGE, page: ()=>const PrintDetailPage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => PrintDetailController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.SEARCH_DEVICE_PAGE, page: ()=>const SearchDevicePage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => SearchDeviceController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.DEVICE_DETAIL_PAGE, page: ()=>const DeviceDetailPage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => DeviceDetailController());
          }),
          middlewares: [LoginMiddleware()]),
      GetPage(
          name: Routers.deliverGoodsPage, page: ()=>const DeliverGoodsPage(),
          binding: BindingsBuilder((){
            Get.lazyPut(() => DeliverGoodsController());
          }),
          middlewares: [LoginMiddleware()]),
    ];
  }
}
